package com.lgy.web.interceptor;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ui.ModelMap;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.context.request.WebRequestInterceptor;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import com.lgy.model.User;
import com.lgy.util.CommonConstant;
import com.lgy.util.StringUtils;

/**
 * 
 * <p>Title: SpringMVCInterceptor2</p>  
 * <p>Description: SpringMVC拦截器类定义方式二：实现HandlerInterceptor接口</p>  
 * @author feng
 * @date 2015年11月27日
 */
public class SpringMVCInterceptor2 implements WebRequestInterceptor  {
	private static Logger logger = LoggerFactory.getLogger(SpringMVCInterceptor2.class);

	public void afterCompletion(WebRequest arg0, Exception arg1) throws Exception {
		
	}

	public void postHandle(WebRequest arg0, ModelMap arg1) throws Exception {
		
	}
	
	/**
	 * （非 Javadoc）  
	 * <p>Title: preHandle</p>  
	 * <p>Description:处理方法请求之前 </p>  
	 * @param arg0
	 * @throws Exception  
	 * @see org.springframework.web.context.request.WebRequestInterceptor#preHandle(org.springframework.web.context.request.WebRequest)
	 */
	public void preHandle(WebRequest webRequest) throws Exception {
		logger.info("方式二 preHandle >>>>>>>>>>>>>>> :" + "处理之前");
	}
}
